package com.entity.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;


/**
 * 美食料理 表定义层。
 *
 * @author admin
 * @since 2024-06-21
 */
public class LiaoliTableDef extends TableDef {

    private static final long serialVersionUID = 1L;

    /**
     * 美食料理
     */
    public static final LiaoliTableDef LIAOLI = new LiaoliTableDef();

    
    public final QueryColumn ID = new QueryColumn(this, "id");

    
    public final QueryColumn TITLE = new QueryColumn(this, "title");

    /**
     * 作者
     */
    public final QueryColumn AUTHOR = new QueryColumn(this, "author");

    
    public final QueryColumn IMAGES = new QueryColumn(this, "images");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, TITLE, IMAGES, AUTHOR};

    public LiaoliTableDef() {
        super("", "liaoli");
    }

    private LiaoliTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public LiaoliTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new LiaoliTableDef("", "liaoli", alias));
    }

}
